import request from '@/utils/request'

const baseURL = '/point'

// 新增或修改点位信息
export const saveOrUpdate = (data = {}) => {
  return request({
    url: `${baseURL}/saveOrUpdate`,
    method: 'post',
    data: data,
  })
}

// 通过上级编码查询下级点位信息
export const selectPointList = (code) => {
  return request({
    url: `${baseURL}/selectPointList`,
    params: {
      code: code,
    }
  })
}
// 根据ID查询点位信息
export const loadPoint = (id) => {
  return request({
    url: `${baseURL}/loadPoint`,
    params: {
      id: id,
    }
  })
}
// 根据ID删除点位信息
export const del = (id) => {
  return request({
    url: `${baseURL}/delete`,
    params: {
      id: id,
    }
  })
}
